package com.xtpt.disaster.service;

import com.xtpt.disaster.bean.JobDetail;
import com.xtpt.disaster.common.PortalResult;
import com.xtpt.disaster.common.PortalResultPage;
import org.springframework.boot.autoconfigure.batch.BatchProperties;

import java.util.List;
import java.util.Map;

public interface JobDetailService {

    public PortalResult insertSelective(JobDetail jobDetail);
    public PortalResult insert(JobDetail jobDetail);
    public PortalResult update(JobDetail jobDetail);
    public PortalResult delete(Long jobId);
    public List<JobDetail> getJobs(JobDetail jobDetail);
    public PortalResultPage getJobsPage(JobDetail jobDetail, Integer pageNo, Integer pageSize);
    public JobDetail getById(Long jobId);

    /**
     * 用于文件夹增量备份时候查询最近一次成功的全量备份
     * @param clientFolderPath 要备份的文件路径
     * @return
     */
    public JobDetail getByClientPath(Long nodeId,String clientFolderPath);
    public List<JobDetail> getAll();
    public PortalResult deleteBatch(long[] ids);
    public Integer updateByPrimaryKeySelective(JobDetail jobDetail);
    public List<Map<String, Object>> selectCountByDay(JobDetail jobDetail);
    List<JobDetail> selectList(JobDetail jobDetail);
}
